import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/opendoorrecord',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/opendoorrecord',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/opendoorrecord',
    method: 'put',
    data
  })
}

export function searchId (id) {
  return request({
    url: 'api/labSwipeCardRecord?id=' + id,
    method: 'get'
  })
}

export function getOpendoorrecordListAPI (data) {
  return request({
    url: 'api/opendoorrecord',
    method: 'get',
    params: {
      size: 10,
      page: 0,
      ...data
    }
  })
}

export function getPersonPicAPI (svrIndexCode, picUri) {
  return request({
    url: 'api/opendoorrecord/getPicture',
    method: 'get',
    params: {
      svrIndexCode,
      picUri
    }
  })
}
export default { add, edit, del }
